/*	
 *				
 *					ISNW ---- It is a war.It is not warcraft!
 *
 *
 *					Author:					zhoukeli(haxixi_keli)
 *					Filename:				ISceneManager.h
 *					CreateTime:				2008/12/21
 *					ModifyTime:				2008/12/21
 *
 */

#ifndef __ISNW_I_SCENE_MANAGER_H__
#define __ISNW_I_SCENE_MANAGER_H__

#include "IDriver.h"
#include "IFileSystem.h"
#include "IAnimateMesh.h"
#include "dimension2d.h"
#include "IReadFile.h"
#include "isnwColor.h"

namespace ISNW
{
namespace scene
{
	class ISkyBoxSceneNode;
	class ITerrainSceneNode;
	class IParticleSystemSceneNode;
	class IBillboardSceneNode;
	class IAnimateMeshSceneNode;
	class ICameraSceneNode;
	class IMeshSceneNode;
	class ISceneNode;

	class ITexture;

	enum E_RENDER_TYPE
	{
		E_RT_CAMERA,
		E_RT_LIGHT,
		E_RT_SOLID,

		E_RT_TERRAIN,

		E_RT_SKY,

		E_RT_DEFAULT,
	};

	enum E_CULL_TYPE
	{
		E_CT_BOX,
		E_CT_PLANE,
	};

	class ISceneManager
	{
	public:
		virtual ~ISceneManager(){}

	public:

		virtual video::IDriver* getdriver() = 0;

		virtual IAnimateMesh* getmesh(c8* filename) = 0;

		virtual bool render(IAnimateMesh* mesh) = 0;

		virtual io::IFileSystem* getfs() = 0;
	
		virtual ICameraSceneNode* getActiveCamera() = 0;

		virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent,core::vector3df pos,
			core::vector3df target,core::vector3df up,s32 id = -1) = 0;

		virtual IMeshSceneNode* addMeshSceneNode(ISceneNode* parent,IMesh* mesh,core::vector3df pos,
			core::vector3df rotate,core::vector3df scale,s32 id = -1) = 0;

		virtual IAnimateMeshSceneNode* addAnimateMeshSceneNode(ISceneNode* parent,IAnimateMesh*mesh,
			core::vector3df pos,core::vector3df rotate,core::vector3df scale,s32 id = -1) = 0;

		virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent,core::dimention2df size,core::vector3df pos,
			core::vector3df rotate,core::vector3df scale,s32 id = -1) = 0;

		virtual IParticleSystemSceneNode* addParticleSystemSceneNode(ISceneNode* parent,core::vector3df pos,
			core::vector3df rotate,core::vector3df scale,s32 id = -1) = 0;

		virtual ITerrainSceneNode* addTerrainSceneNode(ISceneNode* parent,io::IReadFile* heightMap,video::color32 vColor,core::vector3df pos,core::vector3df rotate,
			core::vector3df scale,u32 MLod,s32 smoothFactor,s32 id = -1) = 0;

		virtual ISkyBoxSceneNode* addSkyBoxSceneNode(ISceneNode* parent,video::ITexture* front,video::ITexture* back,
			video::ITexture* left,video::ITexture* right,video::ITexture* top,video::ITexture* bottom,s32 id = -1) = 0;

		virtual ISceneNode* getrootnode() = 0;

		virtual void drawall() = 0;

		virtual void registernodeforrendering(ISceneNode*,E_RENDER_TYPE) = 0;

		virtual void setculltype(E_CULL_TYPE) = 0;
	};
}
}
#endif